<template>
  <div class="text-teg">{{ tagText }}</div>
</template>

<script setup lang="ts">
import { useHolidayCategoryStore } from '../../stores'
import { computed } from 'vue'
import { defineProps } from 'vue'

const props = defineProps({
  id: { type: Number, default: 0 },
  datelist: { type: Array<{ dictValue: number; dictLabel: string }>, default: () => useHolidayCategoryStore().holidayCategory },
})

const tagText = computed(() => {
  const item = props.datelist.find((e: any) => e.dictValue == props.id.toString())
  return item?.dictLabel || '未知'
  // console.log(item);
  // return '请假'
})
</script>
